<?php

header("Content-Type: application/json");
include('../../include/functions.inc.php');
$sql = "SELECT
      concat(cllg_factura.SERIE,'-',cllg_factura.NUMERO) as factura,
      cllg_cheque.NUMERO,cllg_cheque.MONTO,
	  cllg_cheque.BANCO,
      cllg_cheque.ID,
      cllg_cheque.FK_FACURA
FROM
  cllg_factura,
  cllg_cheque
WHERE
  (cllg_cheque.FK_FACURA = cllg_factura.ID AND cllg_cheque.STATUS=0)  ";

$courses = $db->query_toJson_sql($sql, array("NUMERO" => "NUMERO", "MONTO" => "MONTO",
    "BANCO" => "BANCO", "FACTURA" => "factura", "ID_CHEQUE" => "ID", "ID_FACURA" => "FK_FACURA"));

echo $courses;
?>